package org.example.bean;

import org.example.Animal;
import org.example.Feedable;

public class Lion extends Animal implements Feedable {

    private double weight;

    public Lion(String name, int age,double weight) {
        super(name, age);
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "动物姓名："+getName()+","+"动物年龄"+getAge()+","+"狮子的体重："+getWeight();
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    @Override
    public void feed() {
        System.out.println("正在给狮子喂食生肉");
    }
    @Override
    public void makeSound(){
        System.out.println("狮子发出吼叫");
    }
}
